<?php

$ergebnis=safe_query("SELECT * FROM ".PREFIX."partners WHERE displayed = '1' ORDER BY sort");
if(mysql_num_rows($ergebnis)) {
	while($db=mysql_fetch_array($ergebnis)) {
		$partnerID = $db['partnerID'];
		$banner = $db['banner'];
		$alt = htmlspecialchars($db['name']);
		$title = htmlspecialchars($db['name']);
		$img = 'images/partners/'.$db['banner'];
		$name = $db['name'];
		$img_str = '<img src="images/partners/'.$db['banner'].'" style="margin:2px 0;" border="0" alt="'.$alt.'" title="'.$title.'" />';
		if(is_file($img) && file_exists($img)){
			$text = $img_str;
		}
		else $text = $name;
		eval ("\$sc_partners = \"".gettemplate("sc_partners")."\";");
		echo $sc_partners;
	}
}
?>